package org.come.Jpanel;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.plaf.basic.BasicTreeUI;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.TreePath;

import org.come.Frame.ZhuFrame;
import org.come.bean.JadeorGoodstableBean;
import org.come.entity.Goodstable;
import org.come.entity.PartJade;
import org.come.mouslisten.RoleEquipmentMouslisten;
import org.come.mouslisten.ShowAllSuitMouslisten;
import org.come.mouslisten.StorageJadeMouslisten;
import org.come.until.*;

import com.tool.btn.SwitchPageBtn;
import com.tool.btn.WorkshopBtn;
import com.tool.role.RoleData;
import com.tool.tcpimg.RichLabel;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;



/**
 * @author Administrator 合成
 */
public class SynthesisJpanel extends JPanel {

    private JScrollPane jScrollPane, // 套装列表滚动条
            jScrollPane2; // 套装介绍|玉符数量 滚动条

    private JTree jTree; // 套装列表
    private WorkshopBtn workshopBtn;// 合成按钮
    private SwitchPageBtn leftpageBtn,// 上一页按钮
            rightpageBtn;// 下一页按钮
    private static BigDecimal money;// 消耗金钱
    private static JLabel labzb,// 装备
            labyf,// 玉符
            labShowAll;// 选择是否展示所有

    private static DefaultMutableTreeNode top; // 总节点
    public static boolean showAll = true;// 判断是否只显示已有玉符的套装（默认：全部显示）

    public static JLabel[] GoodsListLabel = new JLabel[18]; // 用来存放18个装备表格
    private static RoleEquipmentMouslisten[] goodsMouslistens = new RoleEquipmentMouslisten[18];// 用来存放18个物品的格子监听
    public static int page = 0;// 当前显示第几页装备

    private static JadeorGoodstableBean goodstableBean = new JadeorGoodstableBean();

    public SynthesisJpanel() {
        if ("水墨UI".equals(MyIsif.getStyle())) {
            this.setPreferredSize(new Dimension(490, 428));
            this.setLayout(null);
            this.setBackground(UIUtils.Color_BACK);

            // 选择是否展示所有
            labShowAll = new JLabel("", SwingConstants.CENTER);
            labShowAll.setBounds(11, 230, 17, 17);
            labShowAll.addMouseListener(new ShowAllSuitMouslisten(null, null, this, null));
            this.add(labShowAll);

            // 合成按钮
            workshopBtn = new WorkshopBtn("skin/8100226/newbutton/B20.png", 1, UIUtils.COLOR_WHITE2, UIUtils.TEXT_HY16, "合成", 2);
            workshopBtn.setBounds(60, 374, 59, 24);
            this.add(workshopBtn);

            // 上一页按钮
            leftpageBtn = new SwitchPageBtn("skin/8100226/button/10.png", 1, 1);
            leftpageBtn.setBounds(422, 408, 18, 18);
            this.add(leftpageBtn);

            // 下一页按钮
            rightpageBtn = new SwitchPageBtn("skin/8100226/button/9.png", 1, 2);
            rightpageBtn.setBounds(452, 408, 18, 18);
            this.add(rightpageBtn);

            // 玉符
            labyf = new JLabel("", SwingConstants.CENTER);
            labyf.setBounds(21, 263, 53, 51);
            labyf.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                }

                @Override
                public void mousePressed(MouseEvent e) {
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
                    int index = goodstableBean.getType() - 1;
                    if (goodstableBean.getPartJade() != null && index >= 0 && index < 5) {
                        StorageJadeMouslisten.showMsg(index);
                    }
                }

                @Override
                public void mouseClicked(MouseEvent e) {
                }
            });
            this.add(labyf);

            // 装备
            labzb = new JLabel("", SwingConstants.CENTER);
            labzb.setBounds(100, 263, 53, 51);
            labzb.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                }

                @Override
                public void mousePressed(MouseEvent e) {
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
                    Goodstable goodstable = goodstableBean.getGoodstable();
                    if (goodstable == null) {
                        return;
                    }
                    ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
                }

                @Override
                public void mouseClicked(MouseEvent e) {
                }
            });
            this.add(labzb);

            // 放置装备
            for (int i = 0; i < 18; i++) {
                GoodsListLabel[i] = new JLabel();
                int row = i % 6;
                int col = i / 6;
                GoodsListLabel[i].setBounds(173 + row * 51, 255 + col * 51, 49, 49);
                goodsMouslistens[i] = new RoleEquipmentMouslisten(i, this);
                GoodsListLabel[i].addMouseListener(goodsMouslistens[i]);
                this.add(GoodsListLabel[i]);
            }

            top = new DefaultMutableTreeNode("");
            // 循环放上套装面板的方法
            AccessSuitMsgUntil.showSuitMethod(top, showAll);

            // 套装列表
            jTree = new JTree(top);
            jTree.setOpaque(false);
            jTree.putClientProperty("JTree.lineStyle", "None"); // 去除jtree的线条
            ((BasicTreeUI) jTree.getUI()).setLeftChildIndent(0); // 设置父节点与子节点左对齐，并去除缩进
            DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer() {
                @Override
                public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded,
                                                              boolean leaf, int row, boolean hasFocus) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
                    super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);

                    // 判断是几级的叶子
                    if (node.getLevel() == 2) {
                        int suitid = AccessSuitMsgUntil.returnSuitID(node.getParent().toString());// 套装id
                        int partId = AccessSuitMsgUntil.returnPartsID(node.getUserObject().toString());// 部件id
                        // 根据套装id和部件id获得玉符情况
                        PartJade jade = RoleData.getRoleData().getPackRecord().getPartJade(suitid, partId);

                        if (jade.isJade()) {
                            setForeground(new Color(102, 102, 102));
                        } else {
                            setForeground(new Color(213, 210, 209));
                        }
                    }
                    return this;
                }
            };
            cellRenderer.setLeafIcon(null); // 设置叶子图标
            try {
                cellRenderer.setOpenIcon(CutButtonImage.cuts("skin/8100226/button/B108.png")[0]);
                cellRenderer.setClosedIcon(CutButtonImage.cuts("skin/8100226/button/B109.png")[0]); // 设置关闭子节点图标
            } catch (Exception e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } // 设置打开子节点图标

            cellRenderer.setFont(new Font("宋体", Font.PLAIN, 14));// 设置字体.
            cellRenderer.setBackgroundNonSelectionColor(new Color(0, 0, 0, 0));// 设置非选定节点的背景色
            cellRenderer.setBackgroundSelectionColor(new Color(99, 93, 90));// 设置节点在选中状态下的背景色
            cellRenderer.setBorderSelectionColor(new Color(0, 0, 0, 0));// 设置选中状态下节点边框的颜色

            /*
             * 设置选时或不选时，文字的变化颜色
             */
            cellRenderer.setTextNonSelectionColor(Color.white);// 设置绘制未选中状态下节点文本的颜色
            cellRenderer.setTextSelectionColor(Color.white);// 设置绘制选中状态下节点文本的颜色
            jTree.setCellRenderer(cellRenderer);
            jTree.setRootVisible(false); // 隐藏根节点
            jTree.setRowHeight(20); // 设置节点行高
            // 单击展开子节点
            jTree.addMouseListener(new MouseAdapter() { // 添加鼠标事件处理
                @Override
                public void mousePressed(MouseEvent e) {
                    if (SwingUtilities.isLeftMouseButton(e)) { // 点击了鼠标左键
                        TreePath path = jTree.getSelectionPath();
                        if (path != null) {
                            if (jTree.isExpanded(path)) {
                                jTree.collapsePath(path);// 关闭节点
                            } else {
                                jTree.expandPath(path);// 展开节点
                            }
                        }

                    }
                }
            });
            jTree.addTreeSelectionListener(new TreeSelectionListener() {
                @Override
                public void valueChanged(TreeSelectionEvent e) {

                    JTree tree = (JTree) e.getSource();
                    // 利用JTree的getLastSelectedPathComponent()方法取得目前选取的节点.
                    DefaultMutableTreeNode selectionNode = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

                    if (selectionNode == null) {
                        jScrollPane2.setViewportView(null);
                        return;
                    }
                    String nodeName = selectionNode.toString();
                    if (selectionNode.isLeaf()) {// 判断是否是叶子节点

                        int suitid = AccessSuitMsgUntil.returnSuitID(selectionNode.getParent().toString());// 套装id
                        int partId = AccessSuitMsgUntil.returnPartsID(selectionNode.getUserObject().toString());// 部件id
                        // 判断是否有玉符
                        PartJade jade = RoleData.getRoleData().getPackRecord().getPartJade(suitid, partId);
                        StorageJadeJpanel3 jadeJpanel = new StorageJadeJpanel3();
                        StorageJadeJpanel3.partJade = jade;
                        jScrollPane2.setViewportView(jadeJpanel);

                    } else {
                        int key = AccessSuitMsgUntil.returnSuitID(nodeName);
                        RichLabel label = new RichLabel(UserMessUntil.getAllSuit().getRolesuit().get(key).getIntroduce(),
                                UIUtils.TEXT_FONT);
                        Dimension d = label.computeSize(275);
                        label.setSize(d);
                        label.setPreferredSize(d);
                        jScrollPane2.setViewportView(label);
                    }
                }
            });
            // 套装列表滚动条
            jScrollPane = new JScrollPane(jTree);
            jScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            jScrollPane.getVerticalScrollBar().setUI(new SrcollPanelUI());
            jScrollPane.getViewport().setOpaque(false);
            jScrollPane.setOpaque(false);
            jScrollPane.setBounds(18, 29, 149, 198);
            jScrollPane.setBorder(BorderFactory.createEmptyBorder());
            jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
            this.add(jScrollPane);

            // 套装列表滚动条
            jScrollPane2 = new JScrollPane();
            jScrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            jScrollPane2.getVerticalScrollBar().setUI(new SrcollPanelUI());
            jScrollPane2.getVerticalScrollBar().setUnitIncrement(30);
            jScrollPane2.getViewport().setOpaque(false);
            jScrollPane2.setOpaque(false);
            jScrollPane2.setBounds(185, 55, 297, 173);
            jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
            jScrollPane2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
            this.add(jScrollPane2);
        } else {
            this.setPreferredSize(new Dimension(490, 428));
            this.setLayout(null);
            this.setBackground(UIUtils.Color_BACK);

            // 选择是否展示所有
            labShowAll = new JLabel("", SwingConstants.CENTER);
            labShowAll.setBounds(11, 230, 17, 17);
            labShowAll.addMouseListener(new ShowAllSuitMouslisten(null, null, this, null));
            this.add(labShowAll);

            // 合成按钮
            workshopBtn = new WorkshopBtn("inkImg/hongmu/1/w50.png", 1, UIUtils.COLOR_BTNPUTONG2, UIUtils.TEXT_HY16, "合成", 2);
            workshopBtn.setBounds(47, 374, 60, 26);
            this.add(workshopBtn);

            // 上一页按钮
            leftpageBtn = new SwitchPageBtn("inkImg/hongmu/2/30_png.button.btn_8.png", 1, 1);
            leftpageBtn.setBounds(422, 408, 18, 18);
            this.add(leftpageBtn);

            // 下一页按钮
            rightpageBtn = new SwitchPageBtn("inkImg/hongmu/2/36_png.button.btn_7.png", 1, 2);
            rightpageBtn.setBounds(452, 408, 18, 18);
            this.add(rightpageBtn);

            // 玉符
            labyf = new JLabel("", SwingConstants.CENTER);
            labyf.setBounds(21, 263, 53, 51);
            labyf.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                }

                @Override
                public void mousePressed(MouseEvent e) {
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    int index = goodstableBean.getType() - 1;
                    if (goodstableBean.getPartJade() != null && index >= 0 && index < 5) {
                        StorageJadeMouslisten.showMsg(index);
                    }
                }

                @Override
                public void mouseClicked(MouseEvent e) {
                }
            });
            this.add(labyf);

            // 装备
            labzb = new JLabel("", SwingConstants.CENTER);
            labzb.setBounds(100, 263, 53, 51);
            labzb.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                }

                @Override
                public void mousePressed(MouseEvent e) {
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    Goodstable goodstable = goodstableBean.getGoodstable();
                    if (goodstable == null) {
                        return;
                    }
                    ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
                }

                @Override
                public void mouseClicked(MouseEvent e) {
                }
            });
            this.add(labzb);

            // 放置装备
            for (int i = 0; i < 18; i++) {
                GoodsListLabel[i] = new JLabel();
                int row = i % 6;
                int col = i / 6;
                GoodsListLabel[i].setBounds(173 + row * 51, 255 + col * 51, 49, 49);
                goodsMouslistens[i] = new RoleEquipmentMouslisten(i, this);
                GoodsListLabel[i].addMouseListener(goodsMouslistens[i]);
                this.add(GoodsListLabel[i]);
            }

            top = new DefaultMutableTreeNode("");
            // 循环放上套装面板的方法
            AccessSuitMsgUntil.showSuitMethod(top, showAll);

            // 套装列表
            jTree = new JTree(top);
            jTree.setOpaque(false);
            jTree.putClientProperty("JTree.lineStyle", "None"); // 去除jtree的线条
            ((BasicTreeUI) jTree.getUI()).setLeftChildIndent(0); // 设置父节点与子节点左对齐，并去除缩进
            DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer() {
                @Override
                public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded,
                                                              boolean leaf, int row, boolean hasFocus) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
                    super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);

                    // 判断是几级的叶子
                    if (node.getLevel() == 2) {
                        int suitid = AccessSuitMsgUntil.returnSuitID(node.getParent().toString());// 套装id
                        int partId = AccessSuitMsgUntil.returnPartsID(node.getUserObject().toString());// 部件id
                        // 根据套装id和部件id获得玉符情况
                        PartJade jade = RoleData.getRoleData().getPackRecord().getPartJade(suitid, partId);

                        if (jade.isJade()) {
                            setForeground(new Color(102, 102, 102));
                        } else {
                            setForeground(new Color(213, 210, 209));
                        }
                    }
                    return this;
                }
            };
            cellRenderer.setLeafIcon(null); // 设置叶子图标
            try {
                cellRenderer.setOpenIcon(CutButtonImage.cuts("skin/8100226/button/B108.png")[0]);
                cellRenderer.setClosedIcon(CutButtonImage.cuts("skin/8100226/button/B109.png")[0]); // 设置关闭子节点图标
            } catch (Exception e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } // 设置打开子节点图标

            cellRenderer.setFont(new Font("宋体", Font.PLAIN, 14));// 设置字体.
            cellRenderer.setBackgroundNonSelectionColor(new Color(0, 0, 0, 0));// 设置非选定节点的背景色
            cellRenderer.setBackgroundSelectionColor(new Color(99, 93, 90));// 设置节点在选中状态下的背景色
            cellRenderer.setBorderSelectionColor(new Color(0, 0, 0, 0));// 设置选中状态下节点边框的颜色

            /*
             * 设置选时或不选时，文字的变化颜色
             */
            cellRenderer.setTextNonSelectionColor(Color.white);// 设置绘制未选中状态下节点文本的颜色
            cellRenderer.setTextSelectionColor(Color.white);// 设置绘制选中状态下节点文本的颜色
            jTree.setCellRenderer(cellRenderer);
            jTree.setRootVisible(false); // 隐藏根节点
            jTree.setRowHeight(20); // 设置节点行高
            // 单击展开子节点
            jTree.addMouseListener(new MouseAdapter() { // 添加鼠标事件处理
                @Override
                public void mousePressed(MouseEvent e) {
                    if (SwingUtilities.isLeftMouseButton(e)) { // 点击了鼠标左键
                        TreePath path = jTree.getSelectionPath();
                        if (path != null) {
                            if (jTree.isExpanded(path)) {
                                jTree.collapsePath(path);// 关闭节点
                            } else {
                                jTree.expandPath(path);// 展开节点
                            }
                        }

                    }
                }
            });
            jTree.addTreeSelectionListener(new TreeSelectionListener() {
                @Override
                public void valueChanged(TreeSelectionEvent e) {

                    JTree tree = (JTree) e.getSource();
                    // 利用JTree的getLastSelectedPathComponent()方法取得目前选取的节点.
                    DefaultMutableTreeNode selectionNode = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

                    if (selectionNode == null) {
                        jScrollPane2.setViewportView(null);
                        return;
                    }
                    String nodeName = selectionNode.toString();
                    if (selectionNode.isLeaf()) {// 判断是否是叶子节点

                        int suitid = AccessSuitMsgUntil.returnSuitID(selectionNode.getParent().toString());// 套装id
                        int partId = AccessSuitMsgUntil.returnPartsID(selectionNode.getUserObject().toString());// 部件id
                        // 判断是否有玉符
                        PartJade jade = RoleData.getRoleData().getPackRecord().getPartJade(suitid, partId);
                        StorageJadeJpanel3 jadeJpanel = new StorageJadeJpanel3();
                        StorageJadeJpanel3.partJade = jade;
                        jScrollPane2.setViewportView(jadeJpanel);

                    } else {
                        int key = AccessSuitMsgUntil.returnSuitID(nodeName);
                        RichLabel label = new RichLabel(UserMessUntil.getAllSuit().getRolesuit().get(key).getIntroduce(),
                                UIUtils.TEXT_FONT);
                        Dimension d = label.computeSize(275);
                        label.setSize(d);
                        label.setPreferredSize(d);
                        jScrollPane2.setViewportView(label);
                    }
                }
            });
            // 套装列表滚动条
            jScrollPane = new JScrollPane(this.jTree);
            jScrollPane.setVerticalScrollBarPolicy(22);
            jScrollPane.getVerticalScrollBar().setUI(new ScrollUI());
            jScrollPane.getViewport().setOpaque(false);
            jScrollPane.setOpaque(false);
            jScrollPane.setBounds(18, 29, 142, 194);
            jScrollPane.setBorder(BorderFactory.createEmptyBorder());
            jScrollPane.setHorizontalScrollBarPolicy(31);
            this.add(this.jScrollPane);

            // 套装列表滚动条
            this.jScrollPane2 = new JScrollPane();
            this.jScrollPane2.setVerticalScrollBarPolicy(22);
            this.jScrollPane2.getVerticalScrollBar().setUI(new ScrollUI());
            this.jScrollPane2.getViewport().setOpaque(false);
            this.jScrollPane2.setOpaque(false);
            this.jScrollPane2.setBounds(185, 55, 290, 170);
            this.jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
            this.jScrollPane2.setHorizontalScrollBarPolicy(31);
            this.add(this.jScrollPane2);
        }
    }

    /**
     * 清空界面
     */
    public static void clearInterface() {
        money = null;
        goodstableBean.setGoodstable(null);
        goodstableBean.setPartJade(null);
        goodstableBean.setType(0);
        labzb.setIcon(null);
        labyf.setIcon(null);
    }

    private ImageIcon icon, icon1;

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        if ("水墨UI".equals(MyIsif.getStyle())) {
            if (icon == null) {
                icon = new ImageIcon("inkImg/newbackground/B242.png");
            }
            if (icon1 == null) {
                icon1 = new ImageIcon("skin/8100226/button/13.png");
            }
            // 背景
            g.drawImage(icon.getImage(), 0, 0, 490, 428, this);
            // 画装备信息
            GoodsListFromServerUntil.drawIdlEqu(g, 173, 255, page, 18, 6);
            if (money != null) {
                Util.drawPrice(g, money, 87, 346);
            }
            if (!showAll) {
                g.drawImage(icon1.getImage(), 12, 231, 15, 15, this);
            }
        } else {
            if (this.icon == null) {
                this.icon = new ImageIcon("inkImg/hongmu/2/setsynthesis_hc.png");
            }

            if (this.icon1 == null) {
                this.icon1 = new ImageIcon("inkImg/hongmu/2/showjadesuit.png");
            }

            g.drawImage(this.icon.getImage(), 0, 0, 490, 428, this);
            GoodsListFromServerUntil.drawIdlEqu(g, 173, 255, page, 18, 6);
            if (money != null) {
                Util.drawPrice(g, money, 87, 346);
            }

            if (!showAll) {
                g.drawImage(this.icon1.getImage(), 11, 231, 15, 15, this);
            }
        }

    }

    public JScrollPane getjScrollPane() {
        return jScrollPane;
    }

    public void setjScrollPane(JScrollPane jScrollPane) {
        this.jScrollPane = jScrollPane;
    }

    public JScrollPane getjScrollPane2() {
        return jScrollPane2;
    }

    public void setjScrollPane2(JScrollPane jScrollPane2) {
        this.jScrollPane2 = jScrollPane2;
    }

    public JTree getjTree() {
        return jTree;
    }

    public void setjTree(JTree jTree) {
        this.jTree = jTree;
    }

    public WorkshopBtn getWorkshopBtn() {
        return workshopBtn;
    }

    public void setWorkshopBtn(WorkshopBtn workshopBtn) {
        this.workshopBtn = workshopBtn;
    }

    public static BigDecimal getMoney() {
        return money;
    }

    public static void setMoney(BigDecimal money) {
        SynthesisJpanel.money = money;
    }

    public static JLabel getLabzb() {
        return labzb;
    }

    public static void setLabzb(JLabel labzb) {
        SynthesisJpanel.labzb = labzb;
    }

    public static JLabel getLabyf() {
        return labyf;
    }

    public static void setLabyf(JLabel labyf) {
        SynthesisJpanel.labyf = labyf;
    }

    public static DefaultMutableTreeNode getTop() {
        return top;
    }

    public static void setTop(DefaultMutableTreeNode top) {
        SynthesisJpanel.top = top;
    }

    public static boolean isShowAll() {
        return showAll;
    }

    public static void setShowAll(boolean showAll) {
        SynthesisJpanel.showAll = showAll;
    }

    public static JLabel[] getGoodsListLabel() {
        return GoodsListLabel;
    }

    public static void setGoodsListLabel(JLabel[] goodsListLabel) {
        GoodsListLabel = goodsListLabel;
    }

    public static RoleEquipmentMouslisten[] getGoodsMouslistens() {
        return goodsMouslistens;
    }

    public static void setGoodsMouslistens(RoleEquipmentMouslisten[] goodsMouslistens) {
        SynthesisJpanel.goodsMouslistens = goodsMouslistens;
    }

    public static JadeorGoodstableBean getGoodstableBean() {
        return goodstableBean;
    }

    public static void setGoodstableBean(JadeorGoodstableBean goodstableBean) {
        SynthesisJpanel.goodstableBean = goodstableBean;
    }

}
